package com.luohai.langchain4jspringboot.aiservice;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

/**
 * @author luoh6
 */

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT, //手动装配
        chatModel = "ollamaChatModel", //指定模型
        streamingChatModel = "ollamaStreamingChatModel",
//        chatMemory = "chatMemory", //配置会话记忆对象
        chatMemoryProvider = "chatMemoryProvider" //配置会话记忆对象提供者

)
public interface AiMessagesService {

    @SystemMessage("你是luoh的小助手，大帅比")
    Flux<String> getAiMessages(@MemoryId String memoryId,@UserMessage String message);
}
